package com.javasm.mb_store_api_final.giftsandgoods.gift.controller;

import com.javasm.common.R;
import org.springframework.security.access.annotation.Secured;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className:Goods2GIftsController
 * @author: zhl
 * @date:2024/8/111:25
 * @since : jdk11
 */
@RestController
@RequestMapping("/test")
public class Goods2GIftsController {
//    @Secured("ROLE_超级管理员")
    @PreAuthorize("hasAnyAuthority('examine')")
    @GetMapping("/test1")
    public R test1(){
        return R.ok("tses1");
    }
    @Secured("ROLE_管理员")
    @GetMapping("/test2")
    public R test2(){
        return R.ok("tses2");
    }
    @GetMapping("/test3")
    public R test3(){
        return R.ok("tses3");
    }
}
